package com.itheima;

import com.itheima.utils.JedisUtils;
import redis.clients.jedis.Jedis;

import java.util.Set;

public class JedisTest {
    public static void main(String[] args) {
        //获取连接对象

        Jedis jedis = JedisUtils.getJedis();
        jedis.sadd("set1","abc","abd","dbc","abc");
        Long len = jedis.scard("set1");
        Set<String> set1 = jedis.smembers("set1");
        System.out.println(set1);
        System.out.println(len);
        //关闭连接
        jedis.close();
    }


}
